<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <meta name="applicable-device" content="mobile"/>
    <meta name="apple-mobile-web-app-capable" content="no"/>
    <!--<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">-->
    <meta name="format-detection" content="telephone=no"/>

    <link rel="stylesheet" href="css/all.css"/>
    <link rel="stylesheet" href="css/validform.css" />
    <script src="lib/flexible.js"></script>
    <script src="lib/jquery-1.9.1.min.js"></script>
    <script src="lib/Validform_v5.3.2.js"></script>
</head>
<body class="amend">
<!-- header -->
    <header class="header2 back-fff">
        <a href="JavaScript:history.go(-1)" class="return"><img src="img/234d_03.png" /></a>
        <span class="word">更换手机号</span>
    </header>
<!-- /header -->
<!-- bodyer -->
<div class="placeholder"></div>
<form id="amend_tel2" action="" method="">
    <div class="amend-div">
        <span class="amend-name color-000">新手机号</span>
        <input class="amend-content" id="mobile" name="tel" type="number" maxlength="11" datatype="m" errormsg="手机号不正确！" nullmsg="没有输入！">
        <input class="verify-button" id="id-timer" type="button" value="验证码">
        <span class="Validform_checktip Validform_wrong align"></span>
    </div>
    <div class="amend-div">
        <span class="amend-name color-000">验证码</span>
        <input class="amend-content" name="verify" type="text" datatype="*" errormsg="没有输入！" nullmsg="没有输入！">
    </div>
    <div class="confirm">
        <input class="submit" type="submit" value="确认更换">
    </div>
</form>
<!-- /bodyer -->
<!--验证-->
<script>
    $("#amend_tel2").Validform({
//        data:$("#amend_tel2").serializeArray(),
        tiptype:3
    });
</script>
<script src="js/hgNews.min.js"></script>
<!--验证码-->
<script src="js/timer.js"></script>
<script>
    $("#id-timer").on("click",function(){
        var tt=hgNews.regExp.phone($("#mobile"));
        if (tt == true){
            timer.call(this,{
                coun:60,
                src:hgNews.api.changemobile,
                data:"#mobile",
                callback:function (data){
                    if (data.status == 1){
                        $("#mobile").siblings(".Validform_checktip").empty().addClass("Validform_right").removeClass("Validform_wrong");
                        $("#mobile").removeClass("Validform_error");
                        //$.cookie('modal',"tyryry", {expires: 7 , path: '/'});
                        //console.log($.cookie("modal"));
                    }else{
                        $("#mobile").siblings(".Validform_checktip").text("手机号错误").addClass("Validform_wrong").removeClass("Validform_right");
                        $("#mobile").addClass("Validform_error");
                    }

                }
            });
        }else {
            $(this).siblings(".Validform_checktip").text("手机号错误").addClass("Validform_wrong").removeClass("Validform_right");
            $(this).siblings("#mobile").addClass("Validform_error");
        }
    });
</script>
</body>
</html>
